package com.bzsg.simpleMediaPlayer.data

import kotlin.time.Duration

sealed class PlayerState {
    object Idle : PlayerState()
    object Initialized : PlayerState()
    //resolution:视频的分辨率，用一个整数对表示（宽度, 高度）
    data class Prepared(val resolution: Pair<Int, Int>,val totalDuration: Double) : PlayerState()
    data class Playing(val position: Double, val isBuffering: Boolean = false) : PlayerState()
    data class Paused(val position: Long) : PlayerState()
    data class Seeking(val targetPosition: Long) : PlayerState()
    object Completed : PlayerState()
    object Stopped : PlayerState()
    data class Error(val errorCode: Int, val message: String) : PlayerState()
}
